import tpl from './index.ejs';
import './index.scss';
import { tplReplace } from '../../../utils/tool'
export default () => {
    return {
        name: 'tab',
        tpl(data) {
            let list = "";
            list += tplReplace(tpl, {
                styleClass: 'course-item-lk lk-current',
                field: 'all',
                fieldName: '全部'
            })
            data.forEach((item, index) => {
                list += tplReplace(tpl,{
                    styleClass: 'course-item-lk',
                    field: item.field,
                    fieldName: item.field_name
                })
            });
            return list;
        }
    }
}